<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <script src="js/echarts.min.js"></script>
</head>
<body>
<input type="hidden" th:value="${data}" id="dataNode">
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    let myChart = echarts.init(document.getElementById('main'));
    let dataJsonStr = document.getElementById('dataNode').value;
    console.log(dataJsonStr)
    option = JSON.parse(dataJsonStr)
    myChart.setOption(option);
</script>
</body>
</html>